<?php
/**
 * Created by PhpStorm.
 * User: YUWENXUAN
 * Date: 2017/4/7
 * Time: 16:31
 */

require __DIR__.'/people.php';
require __DIR__.'/speed.php';

$active = new speed();

$a = $active->getBus();
$b = $active->getFoot();
$c = $active->getTrain();
$d = $active->getAircraft();

$time = $b;
//echo $a;
//echo '<br>';
//$time = 2500/ $a;
//echo  $time = 2500/ $a;

switch ($time) {
    case $a:
        $time = 2500/ $a;
        echo '搭公交所花的时间'.$time.'分钟';
        break;
    case $b:
        $time = 2500/ $b;
        echo '走路所花的时间'.$time.'分钟';
        break;
    case $c:
        $time = 2500/ $c;
        echo '搭飞机所花的时间'.$time.'分钟';
        break;
    case $d:
        $time = 2500/ $d;
        echo '搭火车所花的时间'.$time.'分钟';
        break;
    default:
        echo '你还未出发';
}



